package com.baidu.mapapi;

import android.content.Context;
import android.util.Log;
import java.io.IOException;
import java.net.ServerSocket;

public class BMapManager
{
  static boolean b = false;
  Mj a = null;
  private Context c = null;

  public BMapManager(Context paramContext)
  {
    this.c = paramContext;
  }

  public void destroy()
  {
    if (b)
      stop();
    b = false;
    if ((this.a == null) || (Mj.f != null));
    try
    {
      Mj.f.close();
      Mj.f = null;
      this.a.UnInitMapApiEngine();
      this.a = null;
      return;
    }
    catch (IOException localIOException)
    {
      while (true)
      {
        Log.d("baidumap", localIOException.getMessage());
        Mj.f = null;
      }
    }
  }

  public MKLocationManager getLocationManager()
  {
    return Mj.b;
  }

  public boolean init(String paramString, MKGeneralListener paramMKGeneralListener)
  {
    if (paramString == null);
    do
    {
      do
      {
        return false;
        b = false;
      }
      while (this.a != null);
      this.a = new Mj(this, this.c);
      if (!this.a.a(paramString, paramMKGeneralListener))
      {
        this.a = null;
        return false;
      }
    }
    while (!Mj.b.a(this));
    Mj.b.b();
    return true;
  }

  public boolean start()
  {
    if (b)
      return true;
    if (this.a == null)
      return false;
    if (this.a.a())
    {
      b = true;
      return true;
    }
    return false;
  }

  public boolean stop()
  {
    if (!b)
      return true;
    if (this.a == null)
      return false;
    if (this.a.b())
    {
      b = false;
      return true;
    }
    return false;
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.baidu.mapapi.BMapManager
 * JD-Core Version:    0.6.2
 */